﻿@model LCTMoodle.Models.ViewModels.KhoaHocViewModel
@{
    Layout = "~/Views/Shared/_Khung.cshtml";

    ViewData["SiteMap"] = new string[] 
    {
        "Trang chủ", "/",
        "Khóa học", "/KhoaHoc",
        Model.tenKhoaHoc, "/Nhom/" + Model.ma,
        "Quản lý quyền", "/KhoaHoc/QuanLyQuyen/" + Model.ma
    };


    string quyen = ((Dictionary<int, string>)Session["Quyen"])[Model.ma];

    bool coTheQuanLyNhom = quyen.IndexOf("|10|") != -1;

    System.Collections.ArrayList menuAside = new System.Collections.ArrayList();
    System.Collections.ArrayList tam;

    if (coTheQuanLyNhom)
    {
        menuAside.Add("Quản lý nhóm");
        menuAside.Add("menu-quanlynhom");
        tam = new System.Collections.ArrayList();
        tam.Add("Quản lý quyền");
        tam.Add("menu-quanlynhom-quanlyquyen");
        tam.Add("/KhoaHoc/QuanLyQuyen/" + Model.ma);
        menuAside.Add(tam);
    }

    ViewData["MenuAside"] = menuAside;
}

<script>
    maKhoaHoc = '@Model.ma';
</script>
<link href="~/Content/css/KhoaHoc/QuanLyQuyen.css" type="text/css" rel="stylesheet" />
<script src="~/Content/script/KhoaHoc/QuanLyQuyen.js" type="text/javascript"></script>

<section class="current-permission-container">
    <section class="permission-container">
        <h2 id="danh-sach-nhom-quyen-tieu-de" class="title">
            Danh sách nhóm quyền
        </h2>
        <section class="permission-list">
            <ul id="danh-sach-nhom-quyen">
                <li>
                    <form id="them-nhom-quyen">
                        <input name="TenNhomQuyen" type="text" placeholder="Thêm nhóm quyền..." />
                    </form>
                </li>
            </ul>
        </section>
    </section>
    <section class="user-container">
        <h2 id="danh-sach-thanh-vien-tieu-de" class="title">
            Thành viên
        </h2>
        <section class="user-list">
            <form>
                <input type="text" placeholder="Thêm thành viên..." />
            </form>
            <ul id="danh-sach-thanh-vien">

            </ul>
        </section>
    </section>
</section>
<section class="config-permission-container">
    <h2 id="danh-sach-quyen-tieu-de" class="title">
        Danh sách quyền
    </h2>
    <section id="danh-sach-quyen" class="config-permission">

    </section>
</section>